import Layout from '@/views/layout/Layout';

const indexRouter = {
  constantRouterMap: [{
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  {
    name: '404',
    path: '/404',
    component: () => import('@/views/errorPage/404'),
    hidden: true
  },
  {
    name: '401',
    path: '/401',
    component: () => import('@/views/errorPage/401'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: 'home',
    name: 'homeIndex',
    meta: {
      title: '首页'
    },
    children: [{
      path: 'home',
      component: () => import('@/views/home/index'),
      name: 'home',
      meta: {
        title: '首页',
        icon: 'sy'
      }
    }]
  },
  {
    name: 'app',
    path: '/',
    component: Layout,
    redirect: 'app',
    children: [{
      path: 'app',
      component: () => import('@/views/app/index'),
      name: 'app',
      meta: {
        title: '常用应用',
        icon: 'gk',
        noCache: true
      }
    }]
  },

  {
    path: '/yardMgmt',
    component: Layout,
    name: 'yardMgmt',
    meta: {
      title: '堆场管理',
      icon: 'gk'
    },
    children: [{
      path: 'rfCntrRecord/index',
      component: () => import('@/views/yardMgmt/rf-cntr-record'),
      name: 'rfCntrRecord',
      meta: {
        title: '冷藏箱温度记录'
      }
    }
    ]
  },
  {
    path: '/edi',
    component: Layout,
    name: 'edi',
    meta: {
      title: 'EDI管理',
      icon: 'gk'
    },
    children: [{
      path: 'defineEdi/index',
      component: () => import('@/views/edi/define-edi'),
      name: 'defineEdi',
      meta: {
        title: 'EDI数据定义'
      }
    },
    {
      path: 'importShipCntr/index',
      component: () => import('@/views/edi/import-ship-cntr'),
      name: 'importShipCntr',
      meta: {
        title: '进口船图导入'
      }
    },
    {
      path: 'importExpCntrList/index',
      component: () => import('@/views/edi/import-exp-cntr-list'),
      name: 'importExpCntrList',
      meta: {
        title: '出口清单导入'
      }
    },
    {
      path: 'exportShipCntr/index',
      component: () => import('@/views/edi/export-ship-cntr'),
      name: 'exportShipCntr',
      meta: {
        title: '生成联合国船图'
      }
    },
    {
      path: 'ediDictionary/index',
      component: () => import('@/views/edi/edi-dictionary'),
      name: 'ediDictionary',
      meta: {
        title: '数据字典维护'
      }
    },
    {
      path: 'ediErrorFile/index',
      component: () => import('@/views/edi/edi-error-file'),
      name: 'ediErrorFile',
      meta: {
        title: '异常文件管理'
      }
    }
    ]
  }

  ],
  asyncRouterMap: []
};

export default indexRouter;
